﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="gridReport.ascx.cs" Inherits="GUESTSMANAGEMENT.View.Report.gridReport" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<ext:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</ext:ScriptManagerProxy>


<ext:DesktopWindow ID="winGrdReport" AutoHeight="true" Maximizable="false" ExpandOnShow="false" runat="server" Collapsible="true" Icon="User" Title="Relatório" Width="600" Height="400">
    <Body>
        <ext:Store ID="reportStore" runat="server" RefreshAfterSaving="Auto">
            <Reader>
                <ext:JsonReader>
                    <Fields>
                        <ext:RecordField Name="NMUSER" />
                        <ext:RecordField Name="NMEVENT" />
                        <ext:RecordField Name="TOTAL" />
                        <ext:RecordField Name="CONFIRMADOS" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store> 
               
       <ext:Panel ID="Panel1" runat="server" Width="590" Height="470">
            <Body>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North>
                        <ext:FormPanel Width="600" Height="60" ID="FormPanel2" runat="server" Title="Dados do Evento" BodyStyle="padding:5px;" ButtonAlign="Right">
                            <Body>
                                <ext:ColumnLayout ID="ColumnLayout1" runat="server">
                                    <ext:LayoutColumn ColumnWidth=".4">
                                        <ext:Panel ID="LayoutColumn1" runat="server" Border="false">
                                            <Body>
                                                <ext:FormLayout ID="FormLayout2" runat="server">
                                                    <ext:Anchor>
                                                        <ext:DateField ID="eventDate" FieldLabel="Data" runat="server" AllowBlank="false" Width="100" BlankText="Data é requerido!" >
                                                            <AjaxEvents>
                                                                <Select OnEvent="EnventDateSelected" />
                                                            </AjaxEvents>
                                                        </ext:DateField>
                                                    </ext:Anchor>    
                                                </ext:FormLayout>
                                            </Body>
                                        </ext:Panel>
                                    </ext:LayoutColumn>
                                    <ext:LayoutColumn ColumnWidth=".6">
                                        <ext:Panel ID="LayoutColumn2" runat="server" Border="false">
                                            <Body>
                                                <ext:FormLayout ID="FormLayout3" runat="server">
                                                    <ext:Anchor>
                                                        <ext:TextField Width="200" ID="eventName" ReadOnly="true" FieldLabel="Evento" runat="server" MaxLength="255" />
                                                    </ext:Anchor>
                                                </ext:FormLayout>
                                            </Body>
                                        </ext:Panel>
                                    </ext:LayoutColumn>
                                </ext:ColumnLayout>
                            </Body>
                        </ext:FormPanel>
                    </North>
                    <Center>
              
            <ext:GridPanel ID="reportGridPanel" 
                runat="server"
                StoreID="reportStore"
                StripeRows="true"
                AutoWidth="true"
                Height="470"
                Disabled="true"
                >
                            
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="userName" Header="Promoter" Width="270" DataIndex="NMUSER" Sortable="true" />
                        <ext:Column ColumnID="ListName" Header="Evento" Width="162" DataIndex="NMEVENT" Sortable="true" />
                        <ext:Column ColumnID="ConfirmeCd" Header="Convidados" Width="75" DataIndex="TOTAL" Sortable="true" />
                        <ext:Column ColumnID="eventName" Header="Confirmados" Width="75" DataIndex="CONFIRMADOS" Sortable="true" />
                    </Columns>
                </ColumnModel>
                
                <LoadMask ShowMask="true" />
                <SaveMask ShowMask="true" />
                <BottomBar>
                    <ext:PagingToolBar ID="PagingToolBar" runat="server" PageSize="30" StoreID="reportStore" />
                </BottomBar>
                
        </ext:GridPanel>
                    </Center>
                </ext:BorderLayout>
            </Body>
        </ext:Panel>
    </Body>
</ext:DesktopWindow>